<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="styles/index.css">
    <link rel="stylesheet" href="styles/companyInformation.css">
    <script src="js/jq.js"></script>
</head>
<body>
            <div class="load" style="text-align:center;line-height: 50px;">请求数据中...</div>
           <div class="contentBox">
             <div class="box active">
               <ul class="Stock">     <!--  a股 -->
                    <!-- <li><span>公司简介</span>：<span class="briefIntroText"></span></li> -->
                </ul>
             </div>
             
                    </div>  
                </div>
            </div>
             </div>
           </div>

        <script>

        $(function(){
            const url=encodeURI(document.location.toString())
            const stockCode=url.split('stockCode=')[1].split('&')[0]
            const language=url.split('stockCode=')[1].split('&')[1].split('language=')[1]
            // const stockCode='SH.600000'
            // const language='cn'
            const headers={
                'X-Requested-With': 'XMLHttpRequest',
                'Access-Control-Allow-Origin': '*',
                "Access-Control-Allow-Methods": "POST,GET",
                'Access-Control-Allow-Credentials': true,
                'Access-Control-Expose-Headers': 'FooBar',
                'Content-Type': 'application/json;charset=UTF-8',
                'Accept': 'application/json',
                'language':language
      }
            //接口
            $.ajax({
               type:"get",    //请求方式
               async:true,    //是否异步
               url:"/api/stock-server/v1/stock/company",
               dataType :'JSON',
               headers:headers,
               data:{
                 stockCode:stockCode
                 },
               success:function(data){
                $('.load').css('display','none')
                var data = data.data;
                console.log(data)
                for(var i in data){ //塞数据
                if(!data[i]){
           
                }else{
                    var html='<li><span>'+i+'</span>：<span>'+data[i]+'</span></li>'
                  $('.Stock').append(html)
                }
                 
                }
              
                
             }
            })

          });
    </script>
</body>
</html>